package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 代金券规则配置对象 voucher_rules
 *
 * @author ruoyi
 * @date 2025-05-23
 */
public class VoucherRules extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 代金券规则唯一标识符（主键，自增） */
    private Long id;

    /** 关联的门店名称（如"北京朝阳店"） */
    @Excel(name = "关联的门店名称")
    private String storeName;

    /** 关联的门店编号（如"BJ-CY-001"） */
    @Excel(name = "关联的门店编号")
    private String storeCode;

    /** 当前门店在用的代金券列表（JSON数组格式，存储代金券ID、名称、面额、有效期等） */
    @Excel(name = "当前门店在用的代金券列表", readConverterExp = "J=SON数组格式，存储代金券ID、名称、面额、有效期等")
    private String activeVouchers;

    /** 关联的代金券模板ID（若代金券基于模板生成） */
    @Excel(name = "关联的代金券模板ID", readConverterExp = "若=代金券基于模板生成")
    private String voucherTemplateId;

    /** 代金券规则名称（如"周末满减券"） */
    @Excel(name = "代金券规则名称")
    private String voucherName;

    /** 代金券类型（枚举值） */
    @Excel(name = "代金券类型", readConverterExp = "枚=举值")
    private String voucherType;

    /** 代金券面额（如100.00元，折扣券时可为NULL） */
    @Excel(name = "代金券面额", readConverterExp = "如=100.00元，折扣券时可为NULL")
    private BigDecimal faceValue;

    /** 使用门槛（如满200元可用，无门槛券时为0） */
    @Excel(name = "使用门槛", readConverterExp = "如=满200元可用，无门槛券时为0")
    private BigDecimal minimumSpend;

    /** 折扣率（如8折时为0.8，非折扣券时为NULL） */
    @Excel(name = "折扣率", readConverterExp = "如=8折时为0.8，非折扣券时为NULL")
    private BigDecimal discountRate;

    /** 代金券有效期开始时间（可为空，表示无限制） */
    @Excel(name = "代金券有效期开始时间", readConverterExp = "可=为空，表示无限制")
    private Date validStartTime;

    /** 代金券有效期结束时间（可为空，表示无限制） */
    @Excel(name = "代金券有效期结束时间", readConverterExp = "可=为空，表示无限制")
    private Date validEndTime;

    /** 适用商品范围（JSON数组格式，存储商品ID或分类ID） */
    @Excel(name = "适用商品范围", readConverterExp = "J=SON数组格式，存储商品ID或分类ID")
    private String applicableProducts;

    /** 适用商品分类（JSON数组格式，存储分类ID） */
    @Excel(name = "适用商品分类", readConverterExp = "J=SON数组格式，存储分类ID")
    private String applicableCategories;

    /** 单个顾客使用限制（如每人限领1张） */
    @Excel(name = "单个顾客使用限制", readConverterExp = "如=每人限领1张")
    private Long usageLimitPerCustomer;

    /** 已发放总数（用于统计） */
    @Excel(name = "已发放总数", readConverterExp = "用=于统计")
    private Long totalIssued;

    /** 已使用总数（用于统计） */
    @Excel(name = "已使用总数", readConverterExp = "用=于统计")
    private Long totalUsed;

    /** 代金券规则状态 */
    @Excel(name = "代金券规则状态")
    private String status;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setStoreName(String storeName)
    {
        this.storeName = storeName;
    }

    public String getStoreName()
    {
        return storeName;
    }

    public void setStoreCode(String storeCode)
    {
        this.storeCode = storeCode;
    }

    public String getStoreCode()
    {
        return storeCode;
    }

    public void setActiveVouchers(String activeVouchers)
    {
        this.activeVouchers = activeVouchers;
    }

    public String getActiveVouchers()
    {
        return activeVouchers;
    }

    public void setVoucherTemplateId(String voucherTemplateId)
    {
        this.voucherTemplateId = voucherTemplateId;
    }

    public String getVoucherTemplateId()
    {
        return voucherTemplateId;
    }

    public void setVoucherName(String voucherName)
    {
        this.voucherName = voucherName;
    }

    public String getVoucherName()
    {
        return voucherName;
    }

    public void setVoucherType(String voucherType)
    {
        this.voucherType = voucherType;
    }

    public String getVoucherType()
    {
        return voucherType;
    }

    public void setFaceValue(BigDecimal faceValue)
    {
        this.faceValue = faceValue;
    }

    public BigDecimal getFaceValue()
    {
        return faceValue;
    }

    public void setMinimumSpend(BigDecimal minimumSpend)
    {
        this.minimumSpend = minimumSpend;
    }

    public BigDecimal getMinimumSpend()
    {
        return minimumSpend;
    }

    public void setDiscountRate(BigDecimal discountRate)
    {
        this.discountRate = discountRate;
    }

    public BigDecimal getDiscountRate()
    {
        return discountRate;
    }

    public void setValidStartTime(Date validStartTime)
    {
        this.validStartTime = validStartTime;
    }

    public Date getValidStartTime()
    {
        return validStartTime;
    }

    public void setValidEndTime(Date validEndTime)
    {
        this.validEndTime = validEndTime;
    }

    public Date getValidEndTime()
    {
        return validEndTime;
    }

    public void setApplicableProducts(String applicableProducts)
    {
        this.applicableProducts = applicableProducts;
    }

    public String getApplicableProducts()
    {
        return applicableProducts;
    }

    public void setApplicableCategories(String applicableCategories)
    {
        this.applicableCategories = applicableCategories;
    }

    public String getApplicableCategories()
    {
        return applicableCategories;
    }

    public void setUsageLimitPerCustomer(Long usageLimitPerCustomer)
    {
        this.usageLimitPerCustomer = usageLimitPerCustomer;
    }

    public Long getUsageLimitPerCustomer()
    {
        return usageLimitPerCustomer;
    }

    public void setTotalIssued(Long totalIssued)
    {
        this.totalIssued = totalIssued;
    }

    public Long getTotalIssued()
    {
        return totalIssued;
    }

    public void setTotalUsed(Long totalUsed)
    {
        this.totalUsed = totalUsed;
    }

    public Long getTotalUsed()
    {
        return totalUsed;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("storeName", getStoreName())
                .append("storeCode", getStoreCode())
                .append("activeVouchers", getActiveVouchers())
                .append("voucherTemplateId", getVoucherTemplateId())
                .append("voucherName", getVoucherName())
                .append("voucherType", getVoucherType())
                .append("faceValue", getFaceValue())
                .append("minimumSpend", getMinimumSpend())
                .append("discountRate", getDiscountRate())
                .append("validStartTime", getValidStartTime())
                .append("validEndTime", getValidEndTime())
                .append("applicableProducts", getApplicableProducts())
                .append("applicableCategories", getApplicableCategories())
                .append("usageLimitPerCustomer", getUsageLimitPerCustomer())
                .append("totalIssued", getTotalIssued())
                .append("totalUsed", getTotalUsed())
                .append("status", getStatus())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("phone", getPhone())
                .toString();
    }
}
